A Summary of the PSI Program Synthesis System

نویسنده

  • C. Green
چکیده

This paper describes the current status of the PSI program synthesis system. It alloius program specification dialogues using natural language, traces and examples from which a high-level program model is acquired. This model is then refined into an efficient implementation of the program. PSI consists of several modules including a parser-interpreter, trace and examples inference expert, dialogue moderator, program model builder, coder and efficiency expert. Keywords; artificial intelligence, automatic programming. high-level algorithm and information structures. Fragments, on the other hand, form a looser program description. Fragments occur in the order of occurrence of the dialogue, rather than in execution order, and allow less detailed, local, and only part ia l specification of the program. Since the fragments correspond rather closely to what the user says, they ease the burden of the interpreter as well as the trace and example inference module. The model builder must then apply knowledge of correct high level programs to convert the fragments into the model. The model builder processes fragments, checking for completeness and correctness, fills in detai l , corrects minor inconsistencies, and adds cross-references. It also generalizes the program description, converting it into a fo rm that allows the coder to look for good implementations. T h e completed program model may be interpreted by a special model interpreter to check that it performs as desired by the user and also to gather information needed by the efficiency expert such as statistics on set sizes and on probabilities of outcome of tests. T h e PSI program synthesis system is a computer program that acquires high-level descriptions of programs and produces efficient implementations of these programs. Simple symbolic computation programs are specified through dialogues that include natural language, input-output pairs, and partial traces. T h e programs produced are in LISP or in SAIL. PSI is organized as a collection of interacting modules or programmed experts. The overall design is a group effort with one ind iv idua l having responsibility for each module as follows: parser-interpreter Jerrold Ginsparg [Ginsparg-77]; trace and example inference module Jorge V. Philips [Phillips-77]; moderator Louis I. Steinberg; domain expert Ronny van den Heuvel ; model builder Brian P. McCune [McCune-77]; coder Dav id R. Barstow [Barstow-77]; and efficiency expert Elaine Kant [Kant-77]. Th is paper presents a short description of PSI. For fur ther details and discussion of related work, see the references above; for a fuller overview see the description of the design of PSI as of one year ago [Creen-76]. T h e major data paths and modules of the PSI system are shown in the diagram below. Multiple program specification methods are allowed in the user's dialogue with PSI, including Engl ish, input and output examples, and partial traces. A more conventional method, that of a very high-level language is a planned addit ion to PSI as shown in the diagram. PSI's operation may be conveniently factored into an acquisition phase (those modules shown above the program model which acquire the model) and the synthesis phase (those modules shown below the model which produce a program from the model). Sentences are first parsed, then interpreted into fragments. The parser is a relatively general parser which l imits search by incorporating considerable knowledge of English usage. The interpreter is more specific to automatic programming, using program description knowledge as well as knowledge of the last question asked and the current topic to facil itate the interpretation into fragments. Fragments and the program model form two of the major interfaces wi th in PSI. Both are high level program and data structure description languages. The program model includes complete, consistent, and executable (but slowly) Auto. Pro? .« 380 nropn Another input specification method is partial traces. A trace includes as a special case an example input-output pair. Examples are useful for inferring data structures and simple spatial transformations. Partial traces of states of internal and I /O variables allow the inductive inference of control structures. The trace and example inference module infers loose descriptions of programs in the form of fragments, rather than programs themselves. This technique allows domain support to disambiguate possible inferences, and also separates the issue of efficient implementation from the inference of the user's intention. General programming knowledge is distr ibuted throughout the modules described above. Current ly, domain-specific knowledge is also distributed where appropriate, but a domain expert module is being implemented. Appl icat ion domain-specific knowledge (e.g., knowledge about learning programs) wil l be concentrated in this module, which wi l l supply domain support by communicating with other acquisition modules through the fragment interface. T h e moderator, not shown in the diagram, guides the dialogue by selecting or repressing questions for the user. It attempts to keep PSI and the user in agreement on the current topic, provides a review-preview on a topic change, helps the user that gets lost, and allows initiative to shift between PSI and the user. A new module being planned by Richard Cabriel i% an explainer, which wil l generate reasonably clear questions about and descriptions of program models as they are acquired, in order to help verify that the inferred program description is the one desired. It also will be able to explain the how and why of the acquisition and synthesis process to the interested user. Af ter the acquisition phase is complete, the synthesis phase begins. Th is phase may be viewed as a series of refinements or as a heuristic search for an efficient program that satisfies the program model. The coder has a body of program synthesis rules [Green and Barstow-75, 76] that gradually transform the program model from abstract into more detailed constructs unt i l it is in the target language. Both algorithm and data structures are refined interdependently. The coder deals pr imar i ly with the notions of set and correspondence operations and can synthesize programs involving sequences, loops, simple input and output, linked lists, arrays, and hash tables. T h e refinement tree effectively forms a planning space that proposes only legal, but possibly inefficient, programs. This tree structure is shared by the coder and the efficiency expert. In cases where the coder proposes more than one refinement or implementation, the efficiency expert reduces the search by estimating the time-space cost product of each proposed refinement. The better path is followed and there is no backup unless the estimate later proves to be very bad. An addit ional planned method to reduce the size of the search space is the factori iation of the program into relatively independent parts so that all combinations of implementations are not considered. An analysis for bottlenecks can allocate synthesis effort to more critical parts of the program. In summary, we have formulated a framework for an automatic programming system and have a start on the kinds of programming knowledge that must be embedded therein. PSI is moderately successful in that it is currently running and has synthesized many significantly different programs including simple storage and retrieval and learning programs. However, not all of the planned modules are completed yet, and it is still too early to attempt an evaluation of the overall design, its appl icabi l i ty, or the methods used. Acknowledgements T h e individuals responsible for the work reported here include the current PSI members Brian P. McCune, Jorge V. Phill ips, Louis I. Steinberg, David R. Barstow, Jerrold Ginsparg, Ronny van den Heuvel, and Elaine Kant, as well as former members Bruce Nelson, A v r a Cohn, and Juan Ludlow. This research was supported by the Defense Advanced Research Projects Agency at the Department of Defense under contract MDA 903-76-C-0206.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

On Psi-conditional asymptotic stability of first order nonlinear matrix Lyapunov system

We provide necessary and sucient conditions for psi-conditional as-ymptotic stability of the solution of a linear matrix Lyapunov system and sucientconditions for psi -conditional asymptotic stability of the solution of a rst ordernon-linear matrix Lyapunov system X0 = A(t)X + XB(t) + F(t;X).

متن کامل

Trends in Speech and Language Rehabilitation in Iran

This paper is a short review on the Jann and content of speech and language rehabilitation services and the trend of their institutionalization in Iran. A summary of formal education in speech and language therapy in Iran as originated by establishing a 4 year BS rehabilitation program in the College of Rehabilitation Sciences in Tehran in 1974 is given. Since then, speech and language Rehabili...

متن کامل

Optimal Synthesis of a Cascade Refrigeration System of LNG Through MINLP Model for Pure Refrigerant Cycles

 liquefied natural gas (LNG) is the most economical way of transporting natural gas (NG) over long distances. Liquefaction of NG by using vapor compression refrigeration system requires high operating and capital cost. Due to lack of systematic design methods for multistage refrigeration cycles, the conventional approaches of determining optimal cycle configuration are mostly based on trial-an...

متن کامل

Isolation and partial characterization of three protein-synthesis inhibitory proteins from the seeds of Luffa cylindrica.

Three new proteins which inhibit protein synthesis in rabbit reticulocyte lysates were isolated from an extract of sponge gourd (Luffa cylindrica) seeds by chromatography on a AF-Blue Toyopearl column followed by FPLC with a Mono S column. These three protein-synthesis inhibitory proteins (PSIs) have molecular masses of 19 kDa, 15 kDa, and 9 kDa, and were designated 19K-PSI, 15K-PSI, and 9K-PSI...

متن کامل

بررسی پتانسیل خورندگی و رسوب‌‌گذاری در شبکه آب شرب شهری شهرستان تربت‌حیدریه در سال 1392

Background & Aim: Corrosion and scaling in water distribution system are very important as a matter of financial and health issues. This study was carried out to evaluate the corrosion and scaling potential in the water distribution system of Torbat Heydariyeh city in 2012. Methods: This cross- sectional/ descriptive study used cluster sampling in which the city was divided into 15 clusters....

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1977